<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
</head>
<script language=javascript>
function doPrint(){
    bdhtml=window.document.body.innerHTML;
    sprnstr="<!--startprint-->";
    eprnstr="<!--endprint-->";
    prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
    prnhtml=prnhtml.substring(1,prnhtml.indexOf(eprnstr));
    window.document.body.innerHTML=prnhtml+'</div>';
    window.print();
}
</script>
<body>
<button onClick="doPrint()" title="打印">打印</button>
<!--startprint-->
<div style="width: 800px; margin:0 auto;text-align:center;">
<h1 style="font-size:20px; padding:5px 6px; margin:0;">出差申请单</h1>
<table id="print" cellspacing='1' cellpadding='0' border="1" style="border-collapse:collapse;font-size:14px;border:solid 1px #000;">
  <tr style="height:25px; line-height:25px;text-align:center;">
    <td style="font-weight:bold;border:solid 1px #000;" width="12%">工号</td>
    <td width='12%' style="border:solid 1px #000;">{$user['code']}</td>
    <td style="font-weight:bold;border:solid 1px #000;" width="12%">姓名</td>
    <td width="12%" style="border:solid 1px #000;">{$user['name']}</td>
    <td style="font-weight:bold;border:solid 1px #000;" width="12%">部门</td>
    <td width="12%" style="border:solid 1px #000;">{$user['department_name']}</td>
    <td style="font-weight:bold;border:solid 1px #000;" width="12%">职务</td>
    <td width="16%" style="border:solid 1px #000;">{$user['job_name']}</td>
  </tr>
  <tr style="height:40px; line-height:25px;text-align:center;">
    <td style="font-weight:bold;border:solid 1px #000;">出差事由</td>
    <td colspan=7 style="border:solid 1px #000;">{$leave['leave_reason']}</td>
  </tr>
  <tr style="height:30px; line-height:25px;text-align:center;">
    <td style="font-weight:bold;border:solid 1px #000;">起止日期</td>
    <td colspan=4 style="border:solid 1px #000;">{$leave['start_time']}—{$leave['end_time']} </td>
    <td style="font-weight:bold;border:solid 1px #000;">共计天数</td>
    <td colspan=2 style="border:solid 1px #000;">{$leave['leave_time']} 天</td>
  </tr>
  <tr style="height:25px; line-height:25px;text-align:center;">
      <td rowspan=5 style="font-weight:bold;border:solid 1px #000;">行程</td>
      <td colspan=2 style="font-weight:bold;border:solid 1px #000;">日期</td>
      <td style="font-weight:bold;border:solid 1px #000;">出发地</td>
      <td style="font-weight:bold;border:solid 1px #000;">目的地</td>
      <td colspan=2 style="font-weight:bold;border:solid 1px #000;">交通工具</td>
      <td  style="font-weight:bold;border:solid 1px #000;">住宿天数</td>
  </tr>
  {foreach from=$leavedetail item=one}
  <tr style="height:25px; line-height:25px;text-align:center;">
      <td colspan=2 style="border:solid 1px #000;">{$one['trip_date']}&nbsp;</td>
      <td style="border:solid 1px #000;">{$one['trip_original']}&nbsp;</td>
      <td style="border:solid 1px #000;">{$one['trip_destingation']}&nbsp;</td>
      <td colspan=2 style="border:solid 1px #000;">{$one['trip_method']}&nbsp;{if $one['trip_start_time']==0 || $one['trip_start_time']}{$one['trip_start_time']}:00{/if}</td>
      <td style="border:solid 1px #000;">{$one['trip_hotel']}&nbsp;</td>
  </tr>
 {/foreach}
  <tr style="height:30px; line-height:25px;text-align:center;">
    <td style="font-weight:bold;border:solid 1px #000;">预支旅费</td>
    <td colspan=7 style="border:solid 1px #000;">（大写）　    万　　　仟　　　佰　　　拾　　　元整（￥&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;）</td>
  </tr>
  <tr style="height:40px; line-height:25px;text-align:center;">
    <td style="font-weight:bold;border:solid 1px #000;">备注</td>
    <td colspan=7 style="border:solid 1px #000;">{$leave['leave_desc']}</td>
  </tr>
  <tr style="height:40px; line-height:25px;text-align:center;">
    <td style="font-weight:bold;border:solid 1px #000;">申请人、日期</td>
    <td colspan=2 style="border:solid 1px #000;">{$user['name']}-{$leave['apply_time']}</td>
    <td style="font-weight:bold;border:solid 1px #000;">部门负责人</td>
    <td colspan=4 style="border:solid 1px #000;">{$r_user.name}</td>
  </tr>
</table>
<!--endprint-->
</div>
</body>
</html>
